The present invention relates to systems and methods for encoding and/or decoding data, and more particularly to systems and methods for encoding and/or decoding streaming data with forward error correction (FEC).
Forward error correction is useful as it provides information to a receiver that allows the receiver to recover from errors in data transmission. Various techniques for FEC are known. FEC has been used with streaming systems to provide for error correction while dealing with the nature of streams.
One typical nature of a stream is that data is received at a transmitter and must be transmitted before the transmitter receives all of the data or knows definitively how much data is to be transmitted. This is not a requirement, as a file (a set of data elements of a known size that might be available in its entirety to the transmitter at the outset of transmission or transmit data generation) might be processed as if it were a stream. However, the design of a transmitter (and receiver in a communication system) where streams are expected might be a design that includes dealing with transmitting data without knowing the size of the data set to be transmitted or having it available for taking into account in generating the data to be transmitted. Typically, when data is processed as a stream it is expected that the process will proceed apace in real-time or near real-time, i.e., that a transmitter will process data as it is received and transmit the processed data as it becomes available.
One FEC streaming architecture is that based on RFC (Request For Comments) 2733. RFC 2733 describes a basic method for applying a specific FEC erasure code to protect an RTP (Real-Time Protocol) stream against packet loss. With such FEC applications, source packets are padded out to the uniform length for the purpose of generating repair packets from source packets. Thus, even when the lengths of all source packets vary dramatically in size, the size of a repair packet is the maximum of the size of all source packets it is generated from. This can cause wastage of bandwidth for transmitting repair packets. For example, if the maximum size of a source packet that a repair packet is generated from is 1,000 bytes in length, then the repair packet will be around 1,000 bytes in length (the repair packet is actually a couple of bytes longer than the maximum source packet). However, if one of the other source packets that the repair packet is generated from is, for example, 300 bytes in length and this source packet is lost, then the repair packet of over 1,000 bytes is used to recover the missing 300 byte source packet, resulting in over 700 of the bytes of the repair packet to be wasted, which results in wasted transmission bandwidth since the repair packet is transmitted.
What is needed is an apparatus or process for efficient FEC encoding and decoding of stream data that can be implemented easily on various computing devices, that efficiently protects against loss in packet streams with variably sized source packets, that provides the ability to vary in the use of particular FEC codes and that can be used to provide protection to various packet streaming protocols, preferably without modifications specific to the streaming protocol.